Skip to content

Phase 1a: Scaffold Cargo workspace and rust-toolchain - #26

Merged
zackees merged 4 commits into
mainfrom
rust/phase-1a-scaffold
Apr 12, 2026
Merged

zackees merged 4 commits into
mainfrom
rust/phase-1a-scaffold

Conversation

@zackees

@zackees zackees commented Apr 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Add minimal Cargo workspace with two crates: fastled-cli (binary) and fastled-py (PyO3 cdylib)
  • Pin Rust toolchain to 1.94.1 via rust-toolchain.toml with clippy and rustfmt components
  • Add ci/env.py with MSVC environment helpers (host_target_triple, _find_vsdevcmd, _windows_build_env, activate, _apply_sccache)
  • Add trampoline scripts _cargo, _rustc, _rustfmt that prefer ~/.cargo/bin
  • Update install script to bootstrap rustup and install the pinned toolchain (adapted from running-process pattern)
  • Update lint script to run cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings before Python linting
  • Update test script to run cargo test --workspace before Python tests
  • Add /target/, /.cargo/, /.rustup/ to .gitignore

No existing Python source files in src/fastled/ were modified.

Test plan

  • cargo build --workspace succeeds with 0 errors
  • cargo test --workspace passes (0 tests, 0 failures)
  • cargo clippy --workspace --all-targets -- -D warnings passes clean
  • cargo fmt --all --check passes with no formatting issues
  • All 121 Python unit tests still pass (pytest tests/unit)
  • pyright src compiler tests reports 0 errors
  • ci/env.py passes ruff, black, isort, pyright checks

Closes #15

zackees added 4 commits April 11, 2026 19:32
Add a minimal Cargo workspace (crates/fastled-cli, crates/fastled-py)
with rust-toolchain.toml pinned to 1.94.1, ci/env.py for MSVC
environment setup, trampoline scripts (_cargo, _rustc, _rustfmt), and
update install/lint/test scripts to bootstrap and exercise the Rust
toolchain alongside the existing Python steps.
- Restore original bash install script format (CI was broken by uv run --script rewrite)
- Add Rust toolchain bootstrap to install script (rustup + pinned channel)
- Fix _cargo trampoline to prepend toolchain bin to PATH and set
  CARGO_BUILD_TARGET to MSVC on Windows (prevents Chocolatey GNU contamination)
- Use uv run instead of venv activation in lint/test scripts
- Remove cygpath dependency from scripts (not available on Linux/macOS)
…rash

The venv-bundled pip crashes on Ubuntu 24.04 CI runners when calling
uname -rs during user-agent detection. Using uv pip directly avoids
invoking the buggy pip entirely.
@zackees
zackees merged commit de8d5ac into main Apr 12, 2026
3 of 9 checks passed
@zackees
zackees deleted the rust/phase-1a-scaffold branch November 5, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 1a: Scaffold Cargo workspace and rust-toolchain

1 participant